package hn.cch;

import hn.cch.bean.Bean;
import hn.cch.constant.Path;
import hn.cch.server.http.HttpServer;
import org.apache.log4j.PropertyConfigurator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Hello world!
 *
 */
public class AppMain
{
    private static Logger logger = LoggerFactory.getLogger(AppMain.class);

    public static void main( String[] args )
    {
        PropertyConfigurator.configure(Path.LOG_PATH);

        logger.info("access main start");
        //加载实例
        Bean.newBean(Path.BEAN_PATH);

        //启动服务
        HttpServer httpServer = new HttpServer(Path.access_server_port);
        Thread thread = new Thread(httpServer);
        logger.info("access server start");
        thread.start();
        logger.info("access server success");

        logger.info("access main success");
    }
}
